package com.tmz.cloudmall.cloudmallproduct.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.tmz.cloudmall.cloudmallcommon.common.annotation.Excel;
import com.tmz.cloudmall.cloudmallcommon.common.core.domain.BaseEntity;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * 品牌对象 pms_brand
 * 
 * @author tmz
 * @date 2025-08-16
 */
@EqualsAndHashCode(callSuper = false)
@Data
@TableName("pms_brand")
public class Brand implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 品牌id */
    private Long brandId;

    /** 品牌名 */
    @Excel(name = "品牌名")
    @NotBlank(message = "品牌名称至少包含一个非空字符")
    private String name;

    /** 品牌logo地址 */
    @Excel(name = "品牌logo地址")
    @NotEmpty(message = "品牌logo地址不能为空")
    @URL(message = "品牌logo地址必须是标准的url地址")
    private String logo;

    /** 介绍 */
    @Excel(name = "介绍")
    private String descript;

    /** 显示状态[0-不显示；1-显示] */
    @Excel(name = "显示状态")
    @NotNull(message = "显示状态必须非空")
    private Long showStatus;

    /** 检索首字母 */
    @Excel(name = "检索首字母")
    @NotEmpty(message = "首字母非空")
    @Pattern(regexp = "^[a-zA-Z]$",message = "首字母必须是a-z或A-Z")
    private String firstLetter;

    /** 排序 */
    @Excel(name = "排序")
    @NotNull(message = "排序非空")
    @Min(message = "排序字段必须非空且大于等于0",value = 0)
    private Long sort;
}
